/*******************************************************************************
 *
 * File: Gamma/DVDDisplayFilters.h
 * Copyright (c) 2004, 2005 STMicroelectronics Limited.
 * 
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file COPYING in the main directory of this archive for
 * more details.
 * 
 * Description : Contains filter coeffs for Horizontal & vertical format
 *               (HAL video display sddispo2 family) taken from the
 *               STCM DVD drivers for the STm8000.
 * 
 ******************************************************************************/

#ifndef _DVD_DISPLAY_FILTER_H
#define _DVD_DISPLAY_FILTER_H


static const ULONG horizontalZoomInCoeffs[] = 
{
    0xf9f9f9f9, 0xf9f9f9f9, 0xfaf9f9f9, 0xfbfafafa, 0xfcfcfbfb, 0xfffefefd, 0x02010000, 0x06050403, 
    0x14131212, 0x16161515, 0x17171717, 0x15161617, 0x10111314, 0x07090c0e, 0xfafe0104, 0xecf0f3f7, 
    0xdcdfe3e7, 0xced2d5d8, 0xc6c7c9cc, 0xc4c4c4c5, 0xcdc9c7c5, 0xe1dbd5d0, 0x02f8f0e8, 0x2f23170c, 
    0xb2aaa39c, 0xd2cac1ba, 0xf4ebe3da, 0x150d05fc, 0x332c251d, 0x4b46403a, 0x5c595550, 0x6362615f, 
    0x07e83c64, 0x03f90804, 0x04fd03fa
};


static const ULONG horizontalZoomNoneCoeffs[] = 
{
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
    0x00000000, 0x00000000, 0x00800000
};

//Horizontal coeff set 3 (zoom out): coefficients for 0.69 <= zoom-in factor < 1

ULONG horizontalZoomOutCoeffs_069_1[] = 
{
    0x01010101, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x02020202, 0x00010101, 0xfefeff00,
    0x0f101112, 0x0a0c0d0e, 0x05060809, 0xff000204, 0xf9fafcfd, 0xf3f5f6f7, 0xf0f0f1f2, 0xeeeeeeef,
    0xb1b0b0af, 0xb7b5b4b2, 0xc2bfbcba, 0xd3cecac6, 0xe9e3ddd8, 0x04fdf6ef, 0x241b130c, 0x473e352c, 
    0xb2a89f96, 0xd8cec5bb, 0xfdf4ebe1, 0x1f170e06, 0x3c352e26, 0x524d4842, 0x625f5b57, 0x68686664, 
    0xfdee5169, 0x03ed0802, 0x00e7002c  
};


//Horizontal coeff set 4 (zoom out): coefficients for 0.5 <= zoom-in factor < 0.69

ULONG horizontalZoomOutCoeffs_05_069[] = 
{
    0x03030404, 0x02030303, 0x01010202, 0x00000001, 0xfeffffff, 0xfdfdfdfe, 0xfbfcfcfc, 0xfbfbfbfb, 
    0xdfdfdfdf, 0xe1e0e0df, 0xe4e3e2e2, 0xeae8e7e6, 0xf2f0eeec, 0xfdfaf7f4, 0x0a070300, 0x1b17120e, 
    0x9f9a9590, 0xb6b0aaa4, 0xcfc9c2bc, 0xebe4ddd6, 0x0901faf3, 0x28201811, 0x48403830, 0x675f5850, 
    0xcdc5beb6, 0xeae3dbd4, 0x04fdf7f0, 0x1b15100a, 0x2d292520, 0x3c393531, 0x4543413e, 0x49494847, 
    0xfb206f49, 0x001213f6, 0x015b00a2  
};

//Horizontal coeff set 5 (zoom out): coefficients for 0.3 <= zoom-in factor < 0.5

static const ULONG horizontalZoomOutCoeffs_03_05[] = 
{
    0xf9f8f8f8, 0xf9f9f9f9, 0xfafafaf9, 0xfbfbfbfa, 0xfdfcfcfc, 0xfffefefd, 0x02010100, 0x06050403, 
    0xdad8d7d6, 0xe0dedddb, 0xe8e6e4e2, 0xf2efedea, 0xfdfaf7f4, 0x090603ff, 0x1713100c, 0x26221e1b, 
    0xc3bfbab6, 0xd4d0ccc7, 0xe7e2ded9, 0xfaf5f0ec, 0x0d0804ff, 0x201c1712, 0x332f2a25, 0x45413c38, 
    0xe5e1ddd9, 0xf5f1ede9, 0x0300fcf9, 0x0f0c0906, 0x19161411, 0x201e1d1b, 0x25242321, 0x27262625, 
    0x082a4a27, 0x00371005, 0x011c00ab  
};


//Horizontal coeff set 6 (zoom out): coefficients for 0.25 <= zoom-in factor < 0.3

static const ULONG horizontalZoomOutCoeffs_025_03[] = 
{
    0xf5f5f4f4, 0xf6f6f5f5, 0xf8f7f7f6, 0xfaf9f9f8, 0xfdfcfbfa, 0x00fffefd, 0x05040201, 0x0a090706, 
    0xdad8d6d5, 0xe2e0dedc, 0xeae8e6e4, 0xf4f2efed, 0xfffcfaf7, 0x0b080502, 0x1815120e, 0x26231f1c, 
    0xd0ccc8c5, 0xdfdbd7d3, 0xeeeae6e2, 0xfdf9f6f2, 0x0d090501, 0x1c181410, 0x2a27231f, 0x3835312e, 
    0xedeae7e3, 0xf8f6f3f0, 0x0300fefb, 0x0c0a0705, 0x13110f0d, 0x18171614, 0x1b1b1a19, 0x1d1d1c1c, 
    0x0c2a3b1d, 0x0046100f, 0x010300ab  
};


//////////////////////////////////////////////////////////////////////////////
// Vertical Filer kernels for various scaling senarios
//
static const ULONG verticalZoomInCoeffs[] = 
{
    0x12121313, 0x10101111, 0x0d0e0f0f, 0x08090b0c, 0x01030506, 0xf9fbfdff, 0xf2f3f5f7, 0xededeff0, 
    0xafaeaeae, 0xb3b2b0af, 0xbebbb8b6, 0xd0cbc6c2, 0xe8e1dbd5, 0x06fef6ef, 0x271f160e, 0x4a423930, 
    0xe1d1c1b1, 0x170afdef, 0x3c352c22, 0x4d4b4742, 0x02ec534e, 0x5d2403f0
};


static const ULONG verticalZoomNoneCoeffs[] = 
{
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 
    0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x40000000
};

//Vertical coeff set 2 (zoom out): coefficients for 0.69 <= zoom-in factor < 1
static const ULONG verticalZoomOutCoeffs_069_1[] = 
{
    0xff000000, 0xfefeffff, 0xfcfcfdfd, 0xfafafbfb, 0xf9f9f9f9, 0xf9f9f9f9, 0xfdfbfafa, 0x040200fe, 
    0x8c888481, 0x9f9a9590, 0xb9b2aba5, 0xd9d0c8c0, 0xfef4ebe2, 0x261c1208, 0x4f453a30, 0x766d6359, 
    0xf1e9e0d7, 0x0d0700f9, 0x201c1813, 0x28272623, 0x02077f29, 0x4a440bfb
};


//Vertical coeff set 3 (zoom out): coefficients for 0.5 <= zoom-in factor < 0.69
static const ULONG verticalZoomOutCoeffs_05_069[] = 
{
    0xd1d0d0cf, 0xd4d3d2d2, 0xd8d7d6d5, 0xe0dedcda, 0xebe8e5e2, 0xfaf6f2ee, 0x0f0904ff, 0x29221b15, 
    0xbbb7b3af, 0xcec9c4c0, 0xe2ddd8d3, 0xf7f2ede7, 0x0e0903fd, 0x241f1914, 0x39342f2a, 0x4c48433e, 
    0xf3ebe3db, 0x0c0600fa, 0x1c191511, 0x2423211f, 0x04305124, 0x71e80830
};


//Vertical coeff set 4 (zoom out): coefficients for 0.3 <= zoom-in factor < 0.5
static const ULONG verticalZoomOutCoeffs_03_05[] = 
{
    0xc9c8c7c7, 0xcdcccac9, 0xd4d2d0cf, 0xdfdcd9d7, 0xeeeae6e3, 0x00fbf7f2, 0x17110b06, 0x312a241d, 
    0xccc8c4c0, 0xdcd8d4d0, 0xede8e4e0, 0xfefaf5f1, 0x100c0703, 0x201c1814, 0x302c2824, 0x3e3a3733, 
    0xf7f2ede7, 0x090501fc, 0x14120f0c, 0x19181716, 0x04384119, 0x65e7e846
};


//Vertical coeff set 5 (zoom out): coefficients for 0.25 <= zoom-in factor < 0.3
static const ULONG verticalZoomOutCoeffs_025_03[] = 
{
    0xc7c6c6c5, 0xcccac9c8, 0xd4d2cfcd, 0xe0dddad7, 0xf0ebe7e4, 0x03fef9f4, 0x1a140e08, 0x342d2720, 
    0xa19a938c, 0xc0b8b0a9, 0xdfd7cfc7, 0xfff7efe7, 0x1e160e07, 0x3b342d25, 0x56504942, 0x6e68625c, 
    0xf8f4efea, 0x070400fd, 0x110f0d0a, 0x15151413, 0x043b7315, 0x6187e84e
};

#endif // _DVD_DISPLAY_FILTER_H
